package com.usian.wemedia.client;

import com.usian.model.media.dtos.WmUserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-wemedia")
public interface WemediaFeign {

    /**
     * 保存自媒体用户
     *
     * @param wmUserDto
     * @return
     */
    @PostMapping("/api/v1/wmuser/save")
    public Integer save(@RequestBody WmUserDto wmUserDto);

    /**
     * 按照用户id查询自媒体用户
     * @param apUserId
     * @return
     */
    @GetMapping("/api/v1/wmuser/findByApUserId/{id}")
    public WmUserDto findByApUserId(@PathVariable(name = "id") Integer apUserId);
}
